<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/static/commons/taglibs.jsp"%>
<%@ include file="/static/commons/meta.jsp"%>
<%@ include file="/static/commons/ecside.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>${title}</title>
		<script type="text/javascript" src="${ctx}/static/scripts/check_all.js"></script>
		<script type="text/javascript">
			function init(){
				parent.waiting_stop();
			}
			function changeStyle(obj){
			  	ec_showContent(obj,"700px");
			}
		</script>
	</head>
	<body onload="init()">
			<ec:table items="list" var="v" title="" width="100%"
				retrieveRowsCallback="process" filterRowsCallback="process"
				maxRowsExported="1000" pageSizeList="15,30,50,all" useAjax="false"
				rowsDisplayed="15" sortable="false" filterable="false"
				resizeColWidth="true" classic="true" minHeight="200"
				excludeParameters="checkAll,ID_,id"
				toolbarContent="extend status|pagejump|navigation|pagesize|refresh"
				action="${ctx}/buyStore/list">
				<ec:row style="text-align:center;">
					<ec:column property="ID_"
						title="<input type='checkbox' name='checkAll' onclick='check_all(this.form,this.form.id)'>"
						style="width:34px;" sortable="false">
						<input type='checkbox' value='${v.buy_id}' name='id' id="id" 
						<c:if test="${not empty v.store_user or  v.status eq 40}">disabled="disabled"</c:if>
							onclick="check_item(this.form,this.form.id)" ></input>
					</ec:column>
					<ec:column property="serial" title="序号" style="width:30px;">${GLOBALROWCOUNT}</ec:column>
					<ec:column property="log_code" title="订单编号" ><a href="javascript:void(0)" onclick="parent.view('${v.buy_id }')">${v.log_code}</a></ec:column>
					<ec:column property="buy_code" title="序号">${v.buy_code}</ec:column>
					<ec:column property="supplier" title="供应商名称">${v.supplier}</ec:column>
					<ec:column property="supplier_addr" title="供应商地址">${v.supplier_addr}</ec:column>
					<ec:column property="supplier_linkman" title="联系人">${v.supplier_linkman}</ec:column>
					<ec:column property="supplier_phone" title="联系电话">${v.supplier_phone}</ec:column>
					<ec:column property="req_date" title="申请日期"><fmt:formatDate value="${v.req_date}" pattern="yyyy-MM-dd HH:mm:ss" /></ec:column>
					<ec:column property="total_price" title="总金额<br/>（单位：元）" style="text-align: right; width: 120px;"><fmt:formatNumber pattern="#,###.00" value="${v.total_price}"></fmt:formatNumber> </ec:column>
					<ec:column property="user_to_name" title="用途">${v.use_to_name}</ec:column>
					<ec:column property="pay_user_name" title="入库人">${v.store_user_name}</ec:column>
					<ec:column property="check_user" title="检验人">${v.check_user}</ec:column>
					<ec:column property="pay_date" title="入库时间"><fmt:formatDate value="${v.store_date}" pattern="yyyy-MM-dd HH:mm:ss" /> </ec:column>
					<ec:column property="status_name" title="状态">
						<input type="hidden" id="director_${v.buy_id }" value="${v.director }" ></input>
						${v.status_name}
					</ec:column>
				</ec:row>
			</ec:table>
	</body>
</html>